# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
pkgname=libxslt
pkgver=1.1.35
pkgrel=0
pkgdesc="XML stylesheet transformation library"
url="http://xmlsoft.org/XSLT/"
arch="all"
license="custom"
makedepends="libxml2-dev libgcrypt-dev libgpg-error-dev"
subpackages="$pkgname-dev $pkgname-doc"
source="https://download.gnome.org/sources/libxslt/${pkgver%.*}/libxslt-$pkgver.tar.xz"

# secfixes:
#   1.1.35-r0:
#     - CVE-2021-30560
#   1.1.34-r0:
#     - CVE-2019-13117
#     - CVE-2019-13118
#   1.1.33-r3:
#     - CVE-2019-18197
#   1.1.33-r1:
#     - CVE-2019-11068
#   1.1.29-r1:
#     - CVE-2017-5029

prepare() {
	default_prepare
	chmod 644 python/tests/*
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
	install -D -m644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING
}
sha512sums="
9dd4a699235f50ae9b75b25137e387471635b4b2da0a4e4380879cd49f1513470fcfbfd775269b066eac513a1ffa6860c77ec42747168e2348248f09f60c8c96  libxslt-1.1.35.tar.xz
"
